-- GENERATED SPELL FOR [Akkiris Lightning-Waker] --


function spell0_20908(pUnit, Event) --@Lightning Discharge,Self--
pUnit:FullCastSpellOnTarget(36915,pUnit)
pUnit:RegisterEvent('Sorts_20908', 500, 1)
end

function spell1_20908(pUnit, Event) --@Lightning Discharge,Self--
pUnit:FullCastSpellOnTarget(39028,pUnit)
pUnit:RegisterEvent('Sorts_20908', 500, 1)
end

function spell2_20908(pUnit, Event) --@Lightning Jump,Self--
pUnit:FullCastSpellOnTarget(36912,pUnit)
pUnit:RegisterEvent('Sorts_20908', 558, 1)
end

function spell3_20908(pUnit, Event) --@Lightning-Waker\'s Curse,n/a--
pUnit:FullCastSpellOnTarget(36914,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20908', 641, 1)
end

function spell4_20908(pUnit, Event) --@Magic Grounding,Self--
pUnit:FullCastSpellOnTarget(19714,pUnit)
pUnit:RegisterEvent('Sorts_20908', 30328, 1)
end

function spell5_20908(pUnit, Event) --@Spell Shock,n/a--
pUnit:FullCastSpellOnTarget(32691,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20908', 6259, 1)
end

function Sorts_20908(pUnit, Event)
local choix_sorts_20908 = math.random(0, 5)
if choix_sorts_20908 == 0 then
pUnit:RegisterEvent('spell0_20908', 1, 1)
end
if choix_sorts_20908 == 1 then
pUnit:RegisterEvent('spell1_20908', 1, 1)
end
if choix_sorts_20908 == 2 then
pUnit:RegisterEvent('spell2_20908', 1, 1)
end
if choix_sorts_20908 == 3 then
pUnit:RegisterEvent('spell3_20908', 1, 1)
end
if choix_sorts_20908 == 4 then
pUnit:RegisterEvent('spell4_20908', 1, 1)
end
if choix_sorts_20908 == 5 then
pUnit:RegisterEvent('spell5_20908', 1, 1)
end
end

function mob20908_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20908', math.random(1500, 3000), 1)
end

function mob20908_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20908_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20908_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20908, 1, 'mob20908_Action')
RegisterUnitEvent(20908, 2, 'mob20908_Leave')
RegisterUnitEvent(20908, 3, 'mob20908_Kill')
RegisterUnitEvent(20908, 4, 'mob20908_Die')
